package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 扫码记录
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_channel_scan_log")
public class ChannelScanLog extends Model<ChannelScanLog> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "scan_code_record_id", type = IdType.ASSIGN_ID)
    private String scanCodeRecordId;
    /**
     * 渠道名称
     */
    @TableField("channel_name")
    private String channelName;
    /**
     * 联系人
     */
    @TableField("contact")
    private String contact;
    /**
     * 联系电话
     */
    @TableField("contact_phone")
    private String contactPhone;
    /**
     * 扫码时间
     */
    @TableField("scan_time")
    private LocalDateTime scanTime;
    /**
     * 扫码用户手机号
     */
    @TableField("scan_user_mobile")
    private String scanUserMobile;
    /**
     * 扫码用户ID
     */
    @TableField("scan_user_id")
    private String scanUserId;
    /**
     * IP地址
     */
    @TableField("ip_address")
    private String ipAddress;
    /**
     * 功能ID
     */
    @TableField("func_id")
    private String funcId;
    /**
     * 渠道编码
     */
    @TableField("channel_code")
    private String channelCode;
    /**
     * 小程序功能地址
     */
    @TableField("func_url")
    private String funcUrl;

    public void freeData() {
        this.scanCodeRecordId = null;
        this.channelName = null;
        this.contact = null;
        this.contactPhone = null;
        this.scanTime = null;
        this.scanUserMobile = null;
        this.scanUserId = null;
        this.ipAddress = null;
        this.funcId = null;
        this.channelCode = null;
        this.funcUrl = null;
    }

}
